Pages

Saturday, October 26, 2024

A Mass of Incandescent Gas

[Title from They Might Be Giants.]

This week, I got a question from my father Steve: We're able to identify the source of nuclear materials used in reactors and weapons from their isotope ratios. Could we do the same thing to figure out which star material that hits Earth came from?

First, let's talk about isotopes: Atoms are made up of a nucleus or protons and neutrons, surrounded by a cloud of electrons. The number of protons tells you what element the atom is – one for hydrogen, two for helium, and on down the periodic table. The number of electrons tells you the charge of the atom – neutral if it's equal to the number of protons, negative or positive for more or fewer electrons. Finally, the number of neutrons tells you the isotope – These are variations on the same element. For example, most carbon on Earth is called carbon-12, which has 6 protons and 6 neutrons for a total atomic mass of 12. However, some is carbon-14, which has 6 protons (since it's still carbon), but 8 neutrons. This configuration is unstable, and gradually decays to carbon-12. The mixture of carbon-14 and carbon-12 leads to radiocarbon dating, which is used in archeology to measure the age of excavations.

Natural uranium is almost all U-238, with small amounts of U-235 and a few other isotopes. Putting it in a nuclear reactor though will change those ratios. As the U-238 decays, it loses neutrons, raising the amount of U-235 present. The amount of U-235 in a sample can be further increased through enrichment, which uses various methods (often advanced centrifuges, which come up in nuclear policy) to separate the lighter U-235 from the heavier U-238. There can also be other isotopes of other elements mixed in depending on the exact process a reactor was using.

Now to stellar compositions: Stars are mostly made up of hydrogen, but the star's mass causes the hydrogen to fuse into helium, releasing energy that helps keep the star from collapsing. Helium can fuse too, and that can continue a few steps down the periodic table, but it's limited, typically petering out near iron:

Wikipedia (Click to enlarge)

The elements in yellow may be present in an active star, and will be spread around the universe when the star eventually explodes. We can find which are in a given star by looking at their absorption spectra:

Wikipedia

The star emits light in a black-body spectrum due to its heat, but the elements it contains will absorb some of that light, leading to dark bands on the spectrum. The frequencies (colors) of those bands correspond to different elements that let us determine the composition of the star.

Now to Steve's suggestion: When massive particles hit the Earth, could we use their makeup to associate them with a particular star? To my understanding, the answer is no, the particles that hit us are typically single protons or neutrons, not entire atoms, and certainly not the collection of atoms that would be needed to find a concentration of certain isotopes. There's another problem too: Uranium and other elements typically associated with isotopic signatures aren't present in active stars – If you look at the table above, you see those need neutron star collisions to form.

So it seems this idea won't work for distant stars, but if we screw things up badly enough on Earth, future scientists will be able to figure out where things went wrong, and curse that we ever trusted Mr. Clevver.

Sunday, October 13, 2024

Zooming On My Cycle

I started my job with the University of Florida in April 2020, right as the COVID work-from-home policies were starting up. As a result, all my meetings are conducted over Zoom. Now and then I get a little bored with the subject at hand (but only very rarely!) and I start thinking about the layout of the meeting participants on my screen:

I try to move my mouse from each window to an adjacent one, visiting each once and returning to the start. This type of problem is the subject of graph theory, which assesses the attributes of nodes (the windows in this case), which are connected by edges (whether two windows are adjacent). The quality we're looking for is called a Hamiltonian cycle. My various meetings have different numbers of participants, and I've been fascinated by whether a given arrangement contains one or more of these cycles.

It turns out this problem is in a category called NP-complete, which is broadly defined as problems that are hard to find solutions for, but easy to check if a given answer works. In this case, given a path through the windows, it's easy to check we visit each once and end at the start, but the only way to find those is to check every possible path. As long as the number of nodes is small, this isn't too taxing, but the complexity scales quickly as we add more people.

Luckily, Zoom only puts 25 people on the screen at a time, and will break the group into pages if there are more. That means I can make a script to test every case! I used the package NetworkX to handle the connections between nodes, which let me generate paths to check. The animation below pages through different numbers of meeting participants, and gives the number of unique cycles at the top.

I find it really interesting how the number of cycles relates to the number of nodes: Even ignoring the drops to zero, the numbers aren't strictly increasing. I'm also surprised by the high numbers of cycles for the bigger groups – I usually only find 1 or 2 before I manage to refocus on the meeting!

Sunday, October 6, 2024

Touched By His Noodly Appendage

[Click here if you've yet to welcome the Flying Spaghetti Monster into your heart and stomach!]

Near out house, there a several car dealerships, which have the requisite flailing noodle men out front:


via GIPHY

I was curious whether I could make a simple model of this system that still showed the interesting dynamics. The way I imagined it was a series of joints stacked on top of each other with fixed length, but able to bend left or right. Gravity will bend each joint according to the distribution of mass above it, and the puffs of air will straighten each joint as it passes through.

Since I'm using only 20 nodes, at first I tried to make the pressure changes move between them smoothly, but I couldn't find a good way to do that without adding a bunch more complexity to the simulation, so instead I just had the pressure move to the next node on each step. The air comes in periodic bursts, which I modeled as a square wave, which turns on and off at some frequency. When I tried this model, I got a bit too much flailing, and my noodle person was spinning crazily around the anchor point, so I realized I needed drag.

There are two typical models for drag, both proportional to the object's velocity, but one linear and the other quadratic. I tried the linear case initially, but that wasn't strong enough, so I switched to the quadratic. I makes sense that we would be in the high-drag case, since this is flimsy plastic sheeting pushing against air.

If you'd like to make plans before opening your own dealership, you can find my code here, or you can sit back and watch some joyous flailing from your own home: