Monday, May 13, 2024

Before Boltzmann

On the last day of class, I touched on some big picture things in my P-Chem class on Statistical Thermodynamics and Kinetics. But after class, while sitting in my office, I started to ponder the conceptual strangeness of entropy before Ludwig Boltzmann’s statistical interpretation.

 

Sadi Carnot had laid the foundations for the theory of heat. At the time, heat was considered a ‘weightless fluid’ called caloric. This fluid spontaneously flowed from hot to cold, down a temperature gradient (the Zeroth Law of Thermodynamics). Carnot devised the heat engine model, and laid the foundations for conservation of energy (First Law of Thermodynamics) by examining the conservation of heat in the ideal cyclic process of the model. The caloric theory of heat turns out to be wrong, and Robert Mayer was instrumental in figuring out that energy (a hard-to-define word) was conserved. Mayer actually called it the conservation of force. William Thomson (Lord Kelvin) came up with ‘energy’. It’s not surprising that all this was confusing to the scientists of the day.

 

It was Rudolf Clausius that extended Carnot’s early ideas but he needed to introduce ‘entropy’ as a partner to energy. Arguments about the conservation of heat (energy) only applied to reversible processes, but we observe many other physical and chemical processes that seem to go in one direction. Entropy is crucial because for a process that proceeds irreversibly, this quantity called entropy increases, at least in an isolated system (Second Law of Thermodynamics), although how fast it would proceed was controlled by kinetics. Clausius connected entropy to heat and temperature mathematically, but could not take the step that Boltzmann did, partly because in the mid-nineteenth century, many scientists did not believe in the existence of tiny molecules that no one could see.

 

Why the Second Law is obeyed was rather mysterious. It was as if there was some hidden variable in nature that commanded that entropy must increase for anything to proceed over time and not get stuck in equilibrium. Not that scientists couldn’t posit strange abstract ideas like a weightless fluid or the luminiferous ether of space. But it’s like invoking magic. Something must be transferring. Something must be facilitating movement. But we have no idea what that something is. Is it even a thing? Invoking entropy was like invoking magic, but not uncommon for scientists positing interesting new ideas. There was a mathematical framework for calculating entropy, but no one knew what it was. We have a better idea now, but like any large cross-cutting concept, it’s hard to provide a succinct definition, and we have to rely on multiple examples to illustrate entropy. One idea is that entropy says something about the quality of energy.

 

By embracing the molecular hypothesis, Boltzmann was able to make a powerful argument that brought the statistical to thermodynamics. It’s how I approach the teaching of thermodynamics to students in my chemistry classes. Why does the Second Law do what it does? Sheer probability. When there are six-gazillions (or moles) of molecules, the most probable distributions far outweigh any seemingly ‘ordered’ macroscopic structures. That’s why entropy is often associated with disorder – a helpful analogy although occasionally misleading. We need Mack and Mike to help us think about what’s actually going on, and we have Boltzmann to thank for that point of view. 

Sunday, May 12, 2024

Data Scraping

Six months from now, Potions for Muggles will be ten years old. When I started blogging, I didn’t think I would keep it up as long I as have. There were multiple occasions when I felt like throwing in the towel, but then after a week or two I would find something interesting I wanted to write about so that I could search for it should the need arise. I guess I wrote my blog so I could retrieve my own thoughts.

 

Several weeks ago I was talking to students in my P-Chem class about A.I., machine learning and data scraping. We were learning some python for P-Chem and I had told the students that ChatGPT is a good place to get snippets of code for whatever you were trying to do. With a little understanding of scripting you could modify the code for the specific task you wanted to carry out. That led to me pontificating about data scrapers and why I thought that large language models are starting to plateau. The amount of data needed for a substantial improvement is exponential. Much of the free data has been scraped. I’m sure that deep-pocketed tech companies will be willing to spend money for paywall data and there’s likely to be an arms race. I also mused on the potential problems of having an A.I. generate data to train another A.I.

 

All this made me think that my blog has likely been scraped several times over. I suppose I could scrape my own blog to train an A.I. that will spout aphorisms or make proclamations in my (written) voice. After I’m dead and gone, someone could still consult the oracle of me that has survived as an interlocutor bot. Personally, I’m not sure I’m all that interesting to talk to. That being said, I do think that I’ve shared some interesting ideas on my blog that are not my intellectual property – that’s what one should expect with a public facing free blog. I have considered stopping this blog. Why give away my good ideas for free to data scrapers? And maybe I will at some point. If this turns out to be my last blog post, then I guess that’s what I decided to do. For now.

 

Humans are fickle. I’m no exception. Also, our memories fade and reorganize over time. That’s not a bad thing. Our brains repackage our thoughts and ideas every time we access them. A large language model generating text is a re-packager of sorts. It’s an intelligence of sorts. My ideas are a molecular drop in a mole of data. Likely insignificant to a data scraping operation. I suppose I still get more out of my blog than a tech company would, and if someone wanted my ideas, they’d actually have to read through and understand my writing. Perhaps that was the whole point of writing my thoughts in the first place.

Saturday, May 4, 2024

Star Wars Day

While teaching remotely during the pandemic, I tried to mix things up in my classes. Thus, on May 4, I did a Star Wars day lecture in my G-Chem class. It was an excuse to talk about several things: (1) that living systems try to stay away from thermodynamic equilibrium, (2) my research into the chemistry of the origin of life, (3) the search for life on Mars, and (4) how E.T. might phone home via the hydrogen 21-cm line. That’s an eclectic mix of topics.

 

I’ve kept up the tradition in my G-Chem II class the last several years, making small changes every year. I did so again yesterday, the Friday just before Star Wars Day. I think it was well-received and students participated in answering my questions which I had pitched as reviewing the topics for the semester. I now introduce the class as a connection between equilibrium thermodynamics (which takes up most of the semester) and the last few classes that cover electrochemistry and redox reactions.

 

We begin with a reminder of isolated, closed, and open thermodynamic systems. We talk about equilibrium being thermodynamic death: when there’s no longer any Gibbs free energy to access, organisms can’t extract chemical energy to do work! Then we talk about the oxidation of sugars into CO2 and H2O as a placard for catabolism. Students remind each other what enthalpy and entropy signify in a chemical reaction. When I ask them where the sugars come from, we then discuss the reverse reductive reaction: photosynthesis. Students dredge from their memory how to determine oxidation numbers of carbon so they can identify the redox reactions.

 

I then ask them why anabolism might take place if the reaction of CO2 and H2O to form glucose and O2 is so thermodynamically unfavorable? That gets us into discussing photons as “low entropy” concentrated packets of energy, as in contrast to dispersed heat that cannot be recovered. Then I segue to how on early Mars (or Earth), CO2 might react with H2 (both exergonic and endergonic) to synthesize formaldehyde. This allows me to introduce the formose reaction and autocatalysis. We compare the pitiful energy extraction from anaerobic metabolism versus aerobic metabolism. I show them graphs depicting the rise of O2 on Earth and the evolution of manganese-catalysts in photosystem II. Finally, we get to humans burning hydrocarbons for even more energy!

 

Communicating with alien life now takes up only a small portion of class time. We discuss the dominance of hydrogen in elemental abundance. Students are reminded of the emission spectra and electronic transitions. I remind them of electron spin and introduce the 21-cm wavelength associated with that transition. We discuss how an Earth scientist might communicate with an alien scientist by trying to find unitless quantities such as pi or the fine-structure constant embedded in the hydrogen spectrum.

 

Then I tell them about the movie “Contact”. It’s old and none of them have watched it (although I encourage them). I then tell them about the SETI message beamed out from the Arecibo telescope. I also show them pictures of the now destroyed telescope and tell them it’s not because James Bond had to foil a terrorist incident (GoldenEye). We briefly talk about why you might not want to communicate with aliens, and I mentioned The Three Body Problem. (One of my students had watched the first season. I haven’t yet.) I end with the Chibolton “reply” crop-circle which is always jaw-dropping because students have never heard of it; I suppose it’s good that none of them are into weird alien conspiracy theories, or at least no one has admitted it yet.

 

Another Star Wars day come and gone. I had fun! Hopefully the students enjoyed it too. On Monday we dive into redox and electrochemistry.