Pages

Monday, December 23, 2019

Yabba-dabba-doo!

Coming back to Michigan means going to the gym again! I'm always interested in the energy measurements given by the machines – Calories are a unit of energy, but with a capital "C", they're actually kilocalories, with a lowercase "c". Here's a 30-minute workout on the elliptical:

This says I burned 268 Calories to go 2.43 miles, or 0.009 miles/Calorie.

A few years ago, my parents got the all-electric Chevy Bolt, which also shows the energy used to go a distance, and so I was curious to see how I stack up to their car in terms of efficiency. I asked Sally to send me a photo of one of the status screens:

The number we're interested in is the 3.0 miles/kilowatt-hour. Kilowatt-hour is another unusual measurement of energy, since Watts are energy per time (specifically Joules per second) which we multiply by a time to get back to energy.

To compare these two, we can convert the units to match: 0.009 miles/Calorie = 7.74 miles/kWh, meaning running on an elliptical is 2.58 times as efficient as a modern electric car! You might be thinking a new charging method is in order...
Giphy

...unfortunately, the energy demands of hauling a car around are a bit higher than your own body, as shown by another status screen:

The total energy of 22.4 kWh comes to almost 20,000 Calories, which I don't think is in the range of many humans!

Sunday, December 8, 2019

Rum Pum Pum

[Title from a favorite book of my childhood.]

I've been thinking about all the great things I'll soon be doing in Michigan again, and I was reminded of something that's been on my list for a while. One of the classes offered at the gym Marika and I went to was Cardio Drumming. The "drums" used in these classes are yoga balls sitting on large plastic buckets, and I often wondered about how the vibrations from the drumsticks travel through the spherical balls.

This is an example of the wave equation, which applies to many systems where neighboring points (in this case, parts of the rubber surface) interact with each other. If we just consider a cross-section of the ball, we can use the 1-dimensional version of the equation:

What this says is that the rate of change of the height of the wave in time is related to how much the height is changing in space. I decided to implement a version of this in Python, but then I realized it would make a great HTML5 doodad!

The controls below let you change the properties of the ball and how you interact with it. Stiffness controls how much of each point's amplitude gets transferred to its neighbors (the c^2 above). Using 0 or 1 can cause some bad (but interesting) things to happen. Strike amplitude is how hard you hit the top of the drum every time you press Strike. Again, setting it too high may cause issues. The bucket provides a wall that the vibrations can bounce off of. If you suddenly increase the bucket size, you can trap waves inside. Damping makes the waves die off over time. Due to a bug somewhere, you have to press Reset when you first load this page, but things should work ok after that. Have fun!


Canvas not supported; please update your browser.

Stiffness

Strike Amplitude

Bucket Size

Damping

Sunday, December 1, 2019

Hysterainy

I've been enduring a lot of rain lately, both in Italy, and now back in Annecy. I'm always frustrated by intermittent rain, since I have to wonder whether it's worthwhile to open/close my umbrella when the rain starts/stops. Whenever I start thinking about it, I'm reminded of the idea of magnetic hysteresis. This is the tendency of magnetic systems to "remember" the state they were in earlier, even when outside conditions change.

The classic model system for this is the Ising model, which I discussed in an earlier post. The difference here is that we vary the external field and see how the system's internal field reacts. The typical plot looks like this:
Based on Wikipedia
On the x-axis is the applied external field (how much it's raining), and on the y-axis is the field within the system (how likely I am to have my umbrella open). Starting in the center, with both fields zero, we slowly increase the external field, which brings the system along with it. When we decrease the field though, the system lags behind, still giving a positive field when the external one is negative, just like keeping my umbrella up while it's not raining.

I decided to adapt my previous Ising script to try to demonstrate this effect, and I was surprised by my success: Hysteresis.py


On the left is the grid of magnetic spins, which interact with their neighbors and the external field. On the right is a plot of the external field vs the average field of the spins. Aside from the weird jiggling frame I couldn't get rid of, it matches the model above pretty well!

Marika and I are packing things up to return to the States in a couple weeks, so I may miss posting.