Pages

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.

Tuesday, November 19, 2019

Cents and Cents-Ability

A late post this week, since I'm currently traveling in Italy with my parents! Going between EU countries and using cash more often than usual has reminded me of how inept I feel making change in euros after 30 years of using the US denominations. I thought I'd take a look at the relationship between the different coin/bill values and the ways to get a certain amount of money.

Here are the US denominations less than $5 (not including $1):
Wikipedia
And the EU denominations less than 5€:
Wikipedia

We're looking for ways to get a total value using some number of each of these coins. We can write this as an equation, for example
where p, n, d, q, and D are the numbers of pennies, nickels, dimes, quarters, and dollars. Since we no longer cut coins to make change, all these values must be integers, which makes this a Diophantine equation. These can be difficult to solve; the Python package SymPy has tools for it, but I couldn't find a way to restrict it to only positive integers (handling anti-pennies is far too dangerous). I was able to make my own though, which uses a simple brute-force technique.

Since it slows down exponentially as the total value gets larger, I was only able to run it for values up to 4 dollars/euros. The results are still interesting though. Here's the minimum number of coins needed to make a total:

As each larger denomination becomes available, there's a sudden drop in the number of coins needed. Since euros include many more denominations, they're able to use fewer.

We won't always get the minimum in change though, so it's useful to look at the different ways to make a value, and find out what the average number of coins is:
These are going to include many sets with mostly pennies though, so we can also look at the median:
At the very beginning of each of these, you can see there are a few cases where the US uses more coins, probably due to the euro having a 2 cent coin, but in the end, more denominations means more coins on average.

There are many things I'll need to unlearn when I return to the US next month (like saying "merci" instead of "thanks"), but since I never really got the hang of euros I suppose making change won't be one of them.

Saturday, November 9, 2019

A Bolt of Cloth

The past couple weeks here have been non-stop drizzling rain – not the nicest farewell I could have – but it reminded me of a post from another of my favorite blogs, Futility Closet.

Wikipedia
Shortly after Benjamin Franklin created the first lightning rod, the idea caught on in Europe as a fashion accessory. There were umbrellas fitted with lightning rods (above), as well as hats, which trailed a wire for grounding. The information on these is a bit sparse, in particular whether they had ever been tested. This concerned me, since I saw some potential problems with the design, which I thought I'd explore today.

First, a quick explanation of how lightning rods work: During thunderstorms, charge collects in clouds. If enough charge builds up, it can overcome the resistance in the air, and create a channel down to the ground, where it discharges. This is lightning, which can carry lots of charge at high speed. Electricity takes the path of least resistance, and since humans and animals carry a lot of salty water, that makes us appealing routes to the ground. Tall buildings can also make good conductors, but since lightning carries so much energy, it can start fires. To protect ourselves, and our homes, we can make even better channels by topping buildings with a metal rod that connects directly to the Earth through a wire. Based on this, the lightning rod apparel doesn't seem unreasonable, but let's look at some issues.

Ground Current
For real lightning rods, the grounding wire is buried several feet deep to better distribute the charge, but that wouldn't be possible with a rod you carry with you. Instead, the wire just drags behind you, but that's no different from lightning striking the ground near you. Lightning carries a lot of charge, and it takes some space to dissipate, which can be just as dangerous as the initial strike. The National Weather Service webpage illustrates this with a charmingly-90s, yet still horrifying, animated GIF:


According to the Washington Post, ground current can be dangerous as far as 60 feet from the initial strike, so you'd need an awfully long tail on your umbrella/hat, not to mention the danger to anyone else who happens to be near the contact point.

Melting Wire
Since these are fashion accessories we're talking about, the Wikipedia article above mentions that the grounding wire was silver, but that could get expensive. One site I found lists the gauge for a grounding wire as 2 AWG, or about a quarter inch. There's also the problem that silver has a lower melting point than copper, 961.78 °C. That made me curious whether you'd be trading electrocution for being sprayed with molten silver.

The energy absorbed by the wire will be
where I is the current, 𝜌 is silver's resistivity, l is the length of the wire, A its area, and t is the duration of the strike. Using those values, along with a normal (rather than rope-sized) silver chain, and a height of 1.8 meters, I come up with 195 Joules, which is nowhere near enough to melt even a thin chain.

Magnetic Field
So at this point, you're still dead from the ground current, but your relatives will be able to salvage your silver chain. What about your smartphone? When current flows through a wire, it produces a magnetic field, according to

I couldn't find info for smartphones, but according to this site, credit cards could be damaged at a distance of 63 centimeters, and pacemakers at 25 meters! I'm not sure whether the short duration of the bolt would change these calculations, but it still doesn't seem like you or your electronics would be safe in a thunderstorm, even if you are wearing the height of 18th century fashion.

Big thanks to Futility Closet for pointing out this fleeting trend! I'm sure we would never use new technology in such a frivolous way, right?