(*) This is an oblique reference to the wonderful movie “In The Loop”. Search for “Climb the mountain of conflict”, and watch the youtube video. I won’t link to it because it’s slightly NSFW (“strong language”, as they say), and definitely NSFK! But if you’re an adult, it’ll make you truly lol!

Off of quantum mechanics for a moment, and back to the world of macroscopic (newtonian) fluid physics. We’ve been playing a lot with fluid (particle-based) simulations lately, looking at lift, drag, and turbulence, the bernoulli effect, eddies, and other such-like chaotic phenomena. (“Macroscopic” would be putting it a bit too strongly; Maybe “mesoscopic” is the right word?)

I had in mind actually making a Navier-Stokes game, but it turns out that there are already a bunch of great apps out there that simulate these phenomena perfectly well, and are also very fun! I’ve tried out at least a dozen — I only bother with the free ones! — and two are of special note.

The first is Wind Tunnel (Free), by Algorizk (which I assume is either a name or a pun). This is a simple but extremely nice app with all the right capabilities. You can draw arbitrary shapes, view in particle, smoke, pressure, or speed modes, and calculate overall lift and drag. Here are some examples:

There are a bunch of pre-drawn objects (although not many), and you can draw your own objects. My only complaint about this app is that you can’t rotate solid bodies, like the wing above, in order to experiment with angle-of-attach (that is, the position of the object with respect to the flow).

The other great example of a fluid sim is Powder Game. The free version is ad-supported, but the ads are along the bottom, and not too annoying. In addition to being an newtonian fluid simulator, Powder Game has tons of special types of particles:

This lets you do a ton of very fun experiments, like exploding things and watching the chaotic dynamics on Nitro!

You can spend hours with either of these apps in the perfect paradigm of learning-by-playing.

In another post I’ll talk more about some great newtonian sims that are a truly macroscopic, which is fun (and educational) of a very different sort, at a very different level.

Leo’s FLG (Focused Learning Goal) for this year is to build a real quantum computing mod in MineCraft. (Note that the kids set these goals for themselves at the beginning of the year, and although I might have slightly influenced his choice of project, the “in MinceCraft” setting was all Leo!) This came from several sources, aside from just the obvious entanglement of his interest in quantum computers with MineCraft. The main one is that there are two quite cool MineCraft mods, one, called qCraft, that adds a sort of quasi-quantum mechanics, and another, called Mekanism, that adds all sorts of advanced devices, esp. lasers. The qCraft mod actually has quantum computer components, but they are not very elegantly done; We wanted to make it a little more like a real quantum computer by using the Mekanism lasers as the qubit sources, and then add optical components for the gates.

Anyway, so we needed to get our feet a tiny bit wet toward this pretty massively complex FLG. Unfortunately, direct MineCraft modding is done either in Java or Python. (There are a few little experiments in modding in scratch-like languages, but, much as they are nice tries, they have issues, so I decided not to bother with them, at least for the moment.)

The circle represents a qubit that might be a photon, for example, and its color represents its quantum state: green is definite 1, and red is definite 0. It travels a continuous loop from left to right, and then re-appears on the left again, as though it’s on a quantum wire that’s looped around from the end to the start.

When the program starts, the photon’s quantum state is definite 1 (1.0|1>+0.0|0>), and so the photon is green. The M box on the right measures the quantum state, “collapsing” it to 1 or 0. If you just let the program run from the start without doing anything (as above), the measurement gate will just keep reading 1, and incrementing the 1 count. The photon will just stay green.

The hex is a Hadamard gate (H gate), which splits the quantum state in half: 0.5|1>+0.5|0>. (Remember that we’re simplifying here, so there are no complex values or normalizations, and I’m using probabilities instead of amplitudes; I did say “simplified” and “baby steps”, right?!) If you drag the hex into the photon’s path (pic below), the state becomes a mixture of 1 and 0, and the color becomes a (ugly) mixture of red and green:

When the qubit in this 50/50 state gets measured (that is, when it hits the M gate), there’s a 50/50 chance of “collapsing” into a 1 or a 0. It’ll change to either red or green, start again at the left, hit the H gate again, and so on. If you let it run like that for a while, the counts of 1 and 0 will come out the same, statistically speaking.

Leo designed a maze game (roughly) based on quantum mechanics and entanglement.

Here’s the board (the player tokens are the dime and quarter):

Each square represents a quantum state, so the maze is a state space.There are six paths out of each state, to some other state (or back to itself). (Well, there are supposed to be six paths out of each state, but Leo was being highly disorganized in drawing the maze, so we ended up with a few less in the latter states, but anyway…)

Both players start out in the start state, entangled together. Rounds are collective, that is, players play together. A round begins by rolling two die: First the count die (the green one, in this case) is rolled, and then the path die (yellow) is rolled the number of times shown by the count die. So, for example, if the count die rolls 3, we would then roll the path die three times. Let’s say that the path results are: 4,2,4. Each player then chooses one of the paths to take from their current state to a new state, trying to reach the end state. BUT, there is an “exclusion” constraint(*) that requires that only one player choose each value. So, in the example above (4,2,4), if one player wants to move on path 4, and the other on path 2, there is no problem. Similarly, if both want to move on path 4, there’s no problem because there are two 4s. However, if both want to move on path 2, you have to roll against one another for priority, and the player with the highest roll gets to choose his or her path first, and the other player is left with whatever paths are left.

Simple, but fun!

We had ideas for a bunch of enhancements, esp. re-entanglement if we ended up on the same state, and I had this fantasy of using <bra|OP|ket> notation to record the paths, but we never got around to these. It would have been a bit better with a more state space maze.

(*) It occurred to me that it would have made more physical sense for the exclusion constraint to keep the players out of the same state, but that would have required redesigning the board from scratch, with two starts next to one another, or something. We’ll have to think about this for a redesign.

I decided, somewhat insanely, to get Leo a subscription to Science magazine, the lead publication of the AAAS, and one of the two top international scientific periodicals (the other being Nature). My concept here was that we might find at least one interesting science thing to talk about each week, and the pictures in Science are way cool!

(I had gotten him a subscription to Scientific American a while back, but, to be honest, the articles are too long and too wordy, and frankly dumbed-down and pretty boring, so Leo really never got into them. I think what’s going on, in part, is that the graphics/word count is too low in SciAm, whereas in Science it’s way higher, so Science is more like a graphic novel than SciAm.)

The first issue arrived this week, and it turned out that there’s a very high density of articles that were quite interesting, both graphically and in terms of content. Leo was especially interested in this one:

I can hear you yawning, even over the internet!

But wait! I turns out that this is a really cool paper about making very interesting nan0-alloys by combining a bunch of different molecules. It has great graphics, for example:

Notice the interesting seemingly-3-Dimensional egg-like thing in the middle of the picture. The reason that it seems 3D is that is is 3D! We got hold of some PlayDough and made a bunch of model of the various nano-alloys depicted in the paper. Here’s another:

I’m not actually sure which one this was supposed to be…possibly the AuCuCo that it’s sitting on top of.

Anyway, this devolved…or perhaps I should say “evolved” into our creating a complete Clay Science Museum!

Here’s the whole museum:

In the center we have the anatomically correct insides of a person. Here’s a close up:

It’s a male, in case it isn’t obvious; I’ll spare you the details! 🙂

This is a ciliate protozoa that we saw in the microscope the other day from a sample of pond water:

One of the really nice things about this program was that in addition to the usual 2D rendition of gravity warping space(-time), they had a really nice animation of the warping of space(-time) in 3-dimensions, which was something like this:

This morning on the drive to school, Leo decided that he wanted to write in the air so that he could write a message and it would stay there. He had in mind that when the car drove through it, it would come into the car and we would go right through the message, and it would come out the back … or something. I should have thought of sky writing, although I didn’t at the time. Nonetheless, we talked about the possibility of coloring the air molecules – but then the message would move with air currents. We talked about laser projection – but that would need to project onto fog, or something. (This is the obvious place that I should have thought of sky writing!) My last suggestion was thousands of nano-drones that we could program to for a pattern and stay in geocentric place, like the GPS satellites – but then we would disturb them as we drove through. (We retrospectively figured out that this idea probably came from the micro-bots from Big Hero 6, but I had in more in mind Neal Stephenson’s “Toner Wars”.)

A few moments after the conversation died down Leo said (I’m only slightly paraphrasing): “I wish I had a black hole pen that could write on space time. I’ll bet that that would stay in place, except for gravitational warping.”

Leo actually offered an analogy between a pump and batteries — I have no recollection of what discussion context led him to that; possibly none at all — he sometimes just comes out with random observations. So, anyway, I ran with it:

Then we started doing all sorts of analogical problems of this sort:

This one’s sort of out of control:

Red is the solar system, blue is the (bohr) atomic model, and green is a eukaryotic cell.

I mentioned in another post that Leo is obsessed with Where’s my Water. Yesterday we were exploring gravitational lensing, and Leo turned it into a “where’s my laser” game. I don’t think I need to explain this any further; the pics are pretty self-explanatory (except that the thing in the middle is a black hole — but maybe that’s obvious).

A long time ago, when I was doing Gorilla Science, I had the idea to do a mathematical physics (specifically mechanics) audio book entirely based on driving. The idea was (is) that drivers would learn both math and physics, from the ground up, all the way to mathematical mechanics and thermodynamics, all just by listening to this thing in the car, and using the car, the roadway, and the other cars around you as the domain. You’d even do experiments while just driving along on your normal commute. The educational theory was (is) that you need to learn things in context (not very original, I know!), and what better context for mechanics (and thermodynamics) can we have than a one ton spherical cow hurtling around tight curves at 50mph.

Anyway, I of course never got around to the audio book, but yesterday I got to cash out one of the central experiments with Leo.

We were headed to campus, about ten miles if I take the long route, which conveniently includes an un-necessary but useful highway segment. So with Leo and Carrie in the back, and me driving, we set out to record our trip. Since Leo’s still not great and writing between the lines (as you’ll get to see in a moment), Carrie sat next to him and actually filled in the table with instantaneous speed and distance every minute, but Leo was watching the clock and reading off the speed and distances from the dashboard. All I did was drive, and occasionally remind him that the minute had turned over.

Here’s what we ended up with:

Now the cool part!

Back at home we started by plotting distance v time.I drew the axes, but Leo labelled them (with a little help), and made the marks (with a little help), and drew the graph (with a little help).

(I’m gonna stop saying “(with a little help)” and you can just read the following as though everyplace I say that Leo did something, it is followed by that phrase!)

The result is the top graph:

You can see where this is going….

The middle table of numbers is the velocity, that is (read on the right) distance/time. Conveniently, we’d used one minute intervals. Actually, I’d suggested 30 seconds, but Leo insisted on one minute, and it turns out that that was very clever, because the denominators are all 1! (I’m sure he didn’t realize that when he insisted on one minute…I didn’t even realize it until we got to this exercise. He did, however, intuit that 30 seconds would have been too busy, and he was right about that!) Since the denominators are all 1.0, we just left them out. So there you have the average speed (per minute) in that segment. And, easy peezy (or however that’s spelled?) do it again, and you have acceleration – we started just writing them as whole numbers instead of having to write zero-point-one before every one of them.

Leo did every calculation on this page — and NOT with ANY help, aside from my helping to keep track of where the next pair of numbers to process was, and I wrote down some of the numbers where they were small, since, as you can tell from the accelerations, Leo’s not too good at writing small numbers (another reason for dropping the decimals).

So there you go: measurement, physics, a little algebra and calculus, all just from a ride to the playground!

(I’d obviously need a different context for relativity and quantum mechanics … how about The Sun! 🙂 )

As promised in this previous post, I’m going to report the basic plot of Thinking Machine stories after I relate them to Leo — usually at bedtime, so you’re getting this a day late (at least). I’m only summarizing the plots, because If I tried to write them out as actual stories it would take me way too long, and would never happen. I’m also not going to go into much background; you’ll pick up the cast of characters and general idea pretty quickly. In line with the goals of this blog I’m also going to over-describe the STEM-related content in the stories. I usually don’t actually get more than a few sentences into these technical aspects of the topics so as not to interrupt the flow of the story. However we do occasionally end up in an extended discussion, even breaking out the iPhone in bed sometimes to look stuff up.

In last night’s episode Dr. Evil was creating tornadoes to wreak havoc upon various state capitals for the purpose of shorting the stock market and making lots of money.

[Dr. Evil’s specific goal wasn’t really the point here — he’s Evil, after all, so he doesn’t need another goal! — but we did talk briefly about why being able to predict the future was very important for a lot of things, not the least being making money. We also didn’t talk at all about the stock market, nor what selling short means. Next week! 🙂 ]

Anyway, so the National Weather Service computers, which do weather prediction, check their predictions in order to tweak their parameters to improve their predictions. We discussed this sort of machine learning in some greater detail because it’s central to the story line. The computers had begun to notice major anomalies in their predictions, way outside of the normal prediction error … not to mention that tornadoes were showing up in places where they had never been seen before (unlikely), and state capitals were being specifically whipped out by class F4 tornadoes (VERY unlikely).

So the NWS called in Leo and Ada to use The Thinking Machine to help them figure out what was going on. Many previous Thinking Machine stories have involved weather prediction, so Leo knew that weather was mostly controlled by heat, which is mostly controlled by the sun. (Ensued a somewhat long iPhone WunderMap session looking at fronts, and our own near term rain predictions, and how a cold front bearing down on us is probably mostly what this prediction is based on, etc.)

But in this case, the weather was going crazy, so instead of calculating the forward problem, they had to program The Thinking Machine (which is, of course, done by changing the gear settings — remember, it’s essentially a Babbage Machine!) to solve the inverse (backward) problem: That is, given a pattern of phenomena, find out what pattern of heating was creating the observed pattern of tornadoes. Although we didn’t go into any more detail than this in <em>how</em> to solve the inverse problem, we did talk a little about why it’s way harder than the forward problem. I used simple math equations to exemplify this, for example, it’s really easy to do say what 5+4= … he either knows it, or can do a simple (forward) calculation to solve it more-or-less immediately. But the “inverse” problem, e.g., ?+5=11 is harder, because unless you algebraically transform it into ?=11-6, and then solve the subtraction form (which would be easy), you basically have to try a bunch of numbers, and then run the calculation forward and check the result. We did some examples. (I didn’t go into the algebraic transformation part of this discussion; we’re only starting into Algebra, but he got the general idea of forward and inverse problems, and could see that the inverse one was harder than the forward one because you had to try a bunch of numbers.)

Okay, so Leo and Ada programming the thinking machine to take the observed tornado pattern and compute the pattern of heating and cooling required to create it. (Incidentally, I have an idea for a terrific iPad game based on this scenario, in case anyone wants to collabroate on it! 🙂 )

The next thing was to recall (which Leo does, but you won’t) that Dr. Evil has a tunable laser in his hidden lair, and that he had tuned it to infrared (to heat things), and was bouncing the infrared laser beam off his fleet of reflecting satellites to create the heating pattern predicted by the inverse solution. (I didn’t get into the problem that the reflectors would have to be tuned to the laser’s wavelength as well…another time!) Then we did a little rough angle of reflection = angle of incidence, and found the satellites, which the space shuttle went out to collect in order to thwart Dr. Evil’s evil plan.

Remember, all of this was being done in the context of a bedtime story all that physics, meteorology, and computer science seems like it would destroy the interest in the story line, but Leo loves that stuff, and if I let him, we would be exploring every topic in great depth in the middle of the night.