I recently published my first peer-reviewed scientific paper! Hurrah!
“Big deal”, you might say. “People publish papers all the time!” And right you would be, you who say that! My paper’s probably not gonna set the universe on fire. So far it’s only been read about 500 times. It’s not exactly screaming up the charts to join Newton’s Principia Mathematica.
I’m just a humble engineer, not a real scientist. And since I started my research in a state of near-total ignorance, I had to puzzle out lots of super-basic conceptual stuff that scientists probably take for granted. I’ve never seen this stuff written down in one place, not in so many words at least. Hey, maybe if I wrote it down, it might help someone else!
So in this post I’ll explain, for a non-scientific audience, the awesomeness of one single set of equations I’ve spent the last two years grappling with: the Euler equations.
Science! And also, what the hell are the Euler equations?
My paper presents a new method for simulating systems of partial differential equations, or PDEs.
Holy crap! I can feel my audience’s mental eyes rolling already. But don’t worry, I can connect that last sentence to normal, non-dorkulous reality.
Engineers and scientists, which is to say eggheads like me, use PDEs to describe lots of everyday things. Things from the water swirling around your toilet bowl, to the radio waves coming out of your iPhone giving you earlobe cancer.
You can simulate PDEs on a computer, which shows you what those everyday things would act like if you built them for real. We do this because it’s a lot cheaper and easier to design a toilet if you don’t have to build and test a real-life prototype every time you get a new brainwave.
In my paper, I tested my new simulation method on the PDEs for compressible gas flow. I chose those particular equations mostly because they’re simple-ish, and because gas flow is easy to visualize. I also chose them because when I started my research, I didn’t have the brainpower to get any harder equations to work right!
Lemme give you a real-world example of compressible gas flow. Say we’ve got a pipe full of normal air, the kind you’re breathing right now, unless you’re an alien being of some kind. In which case, let me be the first to hail our new alien overlords! The pipe’s made of nice, white plastic, because I’m a minimalist, and has caps on the ends.
We’ll assume our pipe is narrow and smooth enough that the gas only flows lengthways and doesn’t get all turbulent on us. We’ll also assume our pipe doesn’t have any leaks, and is insulated so heat can’t seep in or out. These assumptions are all bunkum, of course, but we’re biting off plenty already, so just go with me here.
I’m about to write three equations with Greek letters in them! But don’t worry right away about what all the bits of the equations mean. We’ll big-picture this thing first, then come back for a closer look later.
It turns out you can describe gases using three numbers at every point along the pipe: the density ρ, the velocity u, and the pressure p. For my non-Hellenic audience, “ρ” is the Greek letter “rho”, which in English is just the letter “r”. We apparently use ρ for density because French physicist and later-life spiked-pain-belt-wearer Blaise Pascal chose it way back in the early 1600s.
If we know all three of these numbers at every point along the pipe at some time t, we can calculate them all for any later time. This tells you everything that the gas is ever going to do. And this sounds pretty easy! How hard can it be to write down some equations if there’s only four letters in them?
Quite hard, actually. Swiss mathematician-slash-cyclops-slash-super-genius Leonhard Euler wrote down the first two of these equations in 1757. Here’s my man Lenny E., droppin’ mad science.
But it took 132 more years of work by a lot of really smart people before French physicist and former marine artilleryman Pierre Hugoniot finished the third one in 1889. Physics books usually just toss off these equations like they should be obvious, but it was quite a bit of work coming up with them the first time.
Here’s what they look like, with names on the left, and equations on the right. A real physicist probably wouldn’t put in names for equations like this, but my brain needs a little extra hand-holding. Don’t try to read these too closely yet—they’ll make sense in a bit, once we talk about the letters and symbols and whatnot.
Today we call these the Euler equations, after the guy who wrote down the first two of them. In principle, these three equations are all you need to know to simulate ideal gas flow.
But there’s a lotta levels of meaning packed in there. Nobody could just read these equations and know what they mean without some sorta explanation. Equations aren’t like English sentences, where you can read them straight through in a glance. They’re more like a code that we use to save space, both on paper and in our brains. So let’s unpack some of those levels!
The Euler equations, level one: We use letters, because they’re shorter than words
If we wrote the Euler equations out in English like chumps, they’d be way too long to work with reasonably. Remember, these equations were invented back when quill pens and inkwells were high-tech!
Plus, once you’ve written more than a few sentences worth of equation, it’s hard to keep them clear in your mind all at once. So we give each concept a letter, and write the equations using those letters instead. Time to get alphabetical!
In the Euler equations t is time, x is the position along the pipe, ρ is the density, u is the velocity, and p is the pressure. Bam! The eT is the “specific total energy”. “Specific” means “per unit of mass”, just like how we measure steak prices in dollars per pound instead of dollars per cubic inch. “Total” energy is the “motion energy” plus the “compression energy”. A scientist would call these the “kinetic” and “potential” energy.
Crikey, this is getting painful! Don’t worry, we’re about to wrap this. Just one more paragraph! We define eT like this:
The γ (Greek letter gamma, known as “g” to normal folks) is the “ratio of specific heats”. It’s just a number that’s different for each type of gas, and it’s equal to about 1.4 for the air in our pipe.
We could have just shoved this last equation into the third Euler equation, but breaking it out like this makes the Euler equations shorter. And I’m all about the succinctness, except when blogging.
The Euler equations, level two: What makes the Euler equations “partial differential” equations?
“Something I’ve always wanted to know!” said no person, ever. But for real, it’s not as abstract as it sounds.
The “∂” symbol is like a cursive “d”, and it stands for “difference”. “∂something/∂t” means “the rate that something is changing over time”, and “∂something/∂x” means “the rate that something is changing along the length of the pipe”. That’s what makes an equation “differential”—it’s got “differences” in it!
If you’ve got more than one kind of difference in an equation, it’s a “partial” differential equation, instead of merely an “ordinary” differential equation. Usually in science and engineering those differences are something changing over time, and something else changing from place to place.
Pretty much any normal phenomenon I can think of involves these two differences, so it’s not exactly mysterious. If I wrote an equation for a loaf of bread rising in the oven, it would be a partial differential equation, since the bread is changing shape over time, and at each spot in the pan.
The Euler equations, level three: There’s a set amount of “stuff”, which just moves around
Scientists wrote down the Euler equations by saying, in math-speak, that mass, momentum, and energy can’t be created or destroyed. Those three things can move around or change into different forms, but the total amounts never change. We call this idea “conservation”, because that’s shorter than calling it “that idea where the total amount of stuff stays the same”.
If you look long enough, conservation just seems to be how the world works. We don’t see rocks growing and shrinking all around us, so we say that “mass is conserved”. We don’t see a flying wooden club change its speed or direction until it hits someone’s head, so we say that “momentum is conserved”. A caveman could have figured this out!
Aha, but what about the conservation of energy? That one’s not quite as obvious. It turns out that “energy” is really just an idea that we invented to separate the things that do happen from the things that don’t.
A rock will roll down a hill on its own. But it won’t roll back up unless you give it a push. When you bend a tree limb, it straightens back out with the same force you used to bend it. We observed lots of things like this. Then we invented a quantity called “energy”, which, when it’s conserved, predicts all these things we observed.
Inventing energy is easier said than done, of course—it did take 132 years to get it right, not counting all the millennia that cavemen spent not thinking of it. But it’s totally not cheating. That’s how science works: see stuff, think of idea, put idea in equation, equation predicts stuff we saw. Bam!
The Euler equations, level four: Things can only affect each other if they’re right next to each other
The Euler equations say that at each point along our white plastic air-filled pipe, any change in the amount of mass, momentum, or energy of the gas at that point has to come in from, or flow out to, the neighboring points. In a stroke of reasonableness, scientists named this idea “locality”.
Locality is what makes a scientific model “realistic”, in the sense of “we’re trying to directly model what reality is doing”. The Euler equations are a realistic model of a gas, because they describe the gas as being made of real stuff moving through real space, even though some inconvenient details like viscosity are left out.
We can also create “abstract” models. An abstract model tells us directly what the outcome of an experiment on the system will be, without representing the workings of the experiment in terms of physical stuff happening.
But why would we ever want to model a real phenomenon with an abstract model? Because abstract models are usually simpler to create and use than realistic models.
For example, Newton’s model of gravity is “abstract”, because it’s non-local. It says that objects pull directly on each other at a distance, with nothing happening in between them. Look at how it works on these white plastic planets.
Newton’s model just says “they attract each other”, but doesn’t say anything about what happens in the space between the planets. In the Newtoniverse, space is “flat”: it doesn’t do anything, it’s just there for the planets to sit in.
A more “realistic” model of gravity is Einstein’s general relativity. It models the space between the planets as a real substance that’s stretched and deformed by the planets’ masses. This curvature of space is what makes the planets attract, like they’re trying to slide downhill towards each other.
General relativity is more accurate than Newton’s model, but it’s also much harder to work with. High-school students can get useful results out of Newton’s model with just a pencil and paper, but to get similar answers from Einstein’s model we’d need a physics graduate student. Heck, just drawing Einstein’s model took me hours, and it’s not even scientifically correct!
In some areas of science, like quantum physics, nobody knows how to create a realistic model. All we have is an abstract model, which is very useful, but difficult to get hold of intuitively. Most scientists have come to terms with this and moved on with their careers. If someone ever did create a realistic model of quantum physics, it would be a helluva discovery!
The Euler equations, level five: Why don’t we just solve them? Isn’t that what people do with equations?
The short answer to “why don’t we just solve them” is “because nobody knows how”. You know how your mouth can easily write a check so big your fists can’t cash it? The same goes for equations—we can easily write one that nobody knows how to solve.
Wait, but we can “simulate” the Euler equations, right? So how is that different from “solving” them?
Well, in a simulation, if I want to know what my gas looks like at time t=10 seconds, I have to start at t=0 seconds and run the simulator forward until it hits 10 seconds, then read the answer. This can take quite a while, and can even give the wrong results, if you set up the simulator wrong. It’s kind of like an old videotape player, where you could fast-forward, but you still had to roll past the whole tape if you wanted to watch the end.
But if magic math fairies handed me a solution to the Euler equations, I could just set t=10 in that solution and get my answer in one step, without having to work my way up to it. Solutions are more like a DVD than a videotape—we can just jump to wherever we want!
The Clay Mathematics Institute has a million-dollar prize waiting for whoever can prove the existence and smoothness of solutions to the Navier-Stokes equations, which are like the Euler equations with viscosity added in. You don’t even have to solve the equations, just prove that solutions exist! That prize has been open for 13 years so far, and nobody’s claimed it yet.
The Euler equations, level infinity! And beyond!
You could keep going deeper and deeper into these equations for a long time. It’s not at all obvious when you first (or second, or third) look at these equations what all the consequences are going to be. I’ve been staring at these and writing a simulator for them for years, and I still don’t feel like I understand them 100%. They’re like a movie that you see something new in every time you watch it—like Transformers 2! I could add five more levels to this blog post, if it wasn’t already ludicrously long.
All this makes me wonder whether we ever “really understand” something as deep as the Euler equations, or if we just get accustomed to them after a while, when we stop running into questions we need answers to. But that’s a philosophical question I’ll leave for another time.
Walker WA (2012) The Repeated Replacement Method: A Pure Lagrangian Meshfree Method for Computational Fluid Dynamics. PLoS ONE 7(7): e39999. doi:10.1371/journal.pone.0039999