Friday, July 31, 2015

The Divergence Theorem and Stokes’ Theorem

When preparing the 5th edition of Intermediate Physics for Medicine and Biology, Russ Hobbie and I added a new homework problem to Chapter 4.
Problem 4. Integrate Eq. 4.8 over a volume and subtract the result from Eq. 4.4. The resulting relationship is called the divergence theorem.
For those of you who don’t keep a copy of IPMB always close at hand (what’s the matter with you?), Eq. 4.8 is
The differential form of the continuity equation.
where “div j” is the divergence of the vector j, and Eq. 4.4 is
The integral form of the continuity equation.
When you put the two equations together, you get (spoiler alert) ,
The divergence theorem.
also known as the divergence theorem. It is one of the fundamental results of vector calculus.

Div, Grad, Curl, and All That, by H. M. Schey, superimposed on Intermediate Physics for Medicine and Biology.
Div, Grad, Curl, and All That,
by H. M. Schey.
If you want to learn more about the divergence theorem, I recommend H. M. Schey’s book Div, Grad, Curl and All That. He writes
For the remainder of this chapter we digress from the mainstream of our narrative to discuss a famous theorem that asserts a remarkable connection between surface integrals and volume integrals. Although this relation may be suggested by the work we have done in electrostatics, the theorem is a mathematical statement holding under quite general circumstances. It is independent of any physics and is applicable in many different places. It is called the divergence theorem, and sometimes Gauss’ theorem… It says that the flux of a vector function through some closed surface equals the triple integral of the divergence of that function over the volume enclosed by the surface.
Besides the divergence theorem, another basic tenet of vector calculus is Stokes’ theorem. Can we make a similar homework problem demonstrating that? Yes! Here is a new problem for Chapter 8.
Problem 23 ½. Integrate Eq. 8.22 over a surface and subtract the result from Eq. 8.21. The resulting relationship is called Stokes’ theorem.
If you don’t have IPMB handy, Eq. 8.21 is
The integral form of Faraday's law.
and Eq. 8.22 is
The differential form of Faraday's law.
where “curl E” is the curl of the vector E. When you put the two equations together, you get
Stokes theorem.
 Schey writes
We [now] discuss another famous theorem, one strongly reminiscent of the divergence theorem and yet, as we’ll see, quite different from it. This theorem, named for the mathematician Stokes, relates a line integral around a closed path to a surface integral over what is called a capping surface of the path…In words, Stokes’ theorem says that the line integral of the tangential component of a vector function over some closed path equals the surface integral of the normal component of the curl of that function integrated over any capping surface of the path.
The divergence theorem and Stokes’ theorem are a bit too mathematical to develop in IPMB, with its emphasis on biological and medical applications. Yet there they are, implicit in our discussions of diffusion and of transcranial magnetic stimulation. If you want to learn more, start with Schey’s wonderful (and relatively inexpensive) book Div, Grad, Curl.

Friday, July 24, 2015

So You Don’t Like Error Functions?

In Chapter 4 of the 5th edition of Intermediate Physics for Medicine and Biology, Russ Hobbie and I introduce the diffusion equation (Equation 4.26)
The one dimensional diffusion equation.
where C is the concentration and D is the diffusion constant. We then study one-dimensional diffusion where initially (t = 0) the region to the left of x = 0 has a concentration Co, and the region to the right has a concentration of zero (Section 4.13). We show that the solution to the diffusion equation is (Equation 4.75)
A solution of the diffusion equation involving an error function.
where erf is the error function.

Some students don’t like error functions (really?). Moreover, often we can gain insight by solving a problem in several ways, obtaining solutions that are seemingly different yet equivalent. Let’s see if we can solve this problem in another way and avoid those pesky error functions. We will use a standard method for solving partial differential equations: separation of variables. Before I start, let’s agree to solve a slightly different problem: initially C(x,0) is Co/2 for x less than zero, and −Co/2 for x greater than zero. I do this so the solution will be odd in x: C(x,t) = −C(−x,t). At the end we can add the constant Co/2 and get back to our original problem. Now, let’s begin.

Assume the solution can be written as the product of a function of only t and a function of only x: C(x,t) = T(t) X(x). Plug this into the diffusion equation, simplify, and divide both sides by TX 
The method of separation of variables applied to the diffusion equation.
The only way that the left and right hand sides can be equal at all values of x and t is if both are equal to a constant, which I will call −k2. This gives two ordinary differential equations
The equation for the temporal part of the diffusion equation after separation of variables.
 and
The solution to the first equation is an exponential
The solution to the equation for the temporal part of the diffusion equation after separation of variables.
and the solution to the second is a sine
The solution to the equation for the spatial part of the diffusion equation after separation of variables.
There is no cosine term because of the odd symmetry. Unfortunately, we don’t know the value of k. In fact, our solution can be a superposition of infinitely many values of k
A solution to the diffusion equation in integral form.
where A(k) specifies the weighting.

To determine A(k), use the Fourier techniques developed in Chapter 11. The result is
The Fourier transform of the solution to the diffusion equation in integral form.
How did I get that? Let me outline the process, leaving you to fill in the missing steps. I should warn you that a mathematician would worry about the convergence of the integrals we evaluate, but you and I’ll brush those concerns under the rug.

At t = 0, our solution becomes
Except for a missing factor of 2π, this looks just like the Fourier transform from Section 11.9 of IPMB. Next, multiply each side of the equation by sin(ωx), and integrate over all x. Then, use Equation 11.66b to express the integral of the product of sines as a delta function. You get
Both C(x,0) and sin(kx) are odd, so their product is even, and for x greater than zero C(x,0) is −Co/2. Therefore,
You know how to integrate sine (I hope you do!), so
Here is where things get dicey. We don’t know what cosine equals at infinity, but if we say it averages to zero the first term goes away and we get our result
Plugging in this expression for A(k) gives our solution for C(x,t). If we want to go back to our original problem with an initial condition of Co on the left and zero on the right, we must add Co/2. Thus
A solution of the one dimensional diffusion equation without error functions.
Let’s compare this solution with the one in Equation 4.75 (given above). Our new solution does not contain the error function! Those of you who dislike that function can celebrate. Unfortunately, we traded the error function for an integral that we can’t evaluate in closed form. So, you can have a function that you may be unfamiliar with and that has a funny name, or you can have an expression with common functions like the sine and the exponential inside an integral. Pick your poison.

Friday, July 17, 2015

Boston

Boston, the debut album by the rock band Boston.
Boston, by Boston.
I did something unusual for me last evening: I went to a rock concert. As a birthday present, my daughter Stephanie took me to Freedom Hill Amphitheater to listen to the band Boston.

I was in high school in 1976 when I bought Boston’s famous debut album. That was a big year: it was the bicentennial of the United States, Jimmy Carter was elected president, Nadia Comaneci was earning 10s and then-Bruce Jenner won the decathlon in the Olympic games, much to my chagrin the Cincinnati Reds won the world series (but it wasn’t quite as exciting a series as the year before, which was the best world series ever), and the Apple Computer Company was formed by Steve Jobs and Steve Wozniak. My family moved from Fort Wayne, Indiana to Ashland, Ohio, and I spent the year playing tuba in the high school band, managing the high school baseball team, reading my first Isaac Asimov book, wondering if I should study physics in college, and listening to Chicago, the Eagles, Peter Frampton, the Wings, and Boston. The severe winter of 1976-1977 in northern Ohio and the simultaneous energy crisis resulted in my high school missing several weeks of classes, so some of my friends and I had time to establish our own garage band: “Hades.” We didn’t have a singer, and my role was to pick out the melody on an electric keyboard while the guitars and drums banged out behind me. Only a few years later disco music and the Bee Gees drove me from rock to country music, which I have listened to ever since.

My ears are still tingling a bit from the concert. How loud was it? Chapter 13 in the 5th edition of Intermediate Physics for Medicine and Biology discusses the decibel scale for measuring sound intensity, a logarithmic scale defined as log10(I/Io), where the sound intensity is
-->I and the reference Io is the minimum perceptible sound (10−12 W m−2). Table 13.1 in IPMB says 120 dB is the threshold for pain, and 130 dB is typical for the peak sound at a rock concert. Stephanie and I were sitting in the back of the amphitheater, so I doubt we ever experienced 130 dB, but we were up there pretty high on the decibel scale. I probably didn’t lose any hair cells in my cochlea (see Section 13.5), but I wonder how the band plays concerts night after night without suffering hearing loss. As people age, they tend to lose the ability to hear high tones: presbycusis. I may not have heard the music last night in the same way I heard it in 1976; some of those frequencies may be lost to me forever.
The leader of Boston is Tom Scholz, their 68-year-old guitar player and keyboardist. Scholz was educated as a mechanical engineer, and is one of the few rock musicians who might enjoy reading IPMB. I found that I could identify with Scholz in some respects: he is past his prime, no longer topping the charts or breaking new ground in rock and roll. But, after decades in the business, he’s still out there performing, playing his music, and even sometimes writing new songs. It makes me want to go write another paper!

My daughter Stephanie and I at a Boston concert at Freedom Hill Amphitheater in Sterling Heights, Michigan.
My daughter Stephanie and I at a Boston concert
at Freedom Hill Amphitheater in Sterling Heights, Michigan.

Friday, July 10, 2015

The Machinery of Life

The Machinery of Life,  by David Goodsell, superimposed on Intermediate Physics for Medicine and BIology.
The Machinery of Life,
by David Goodsell.
In the very first section of the 5th edition of Intermediate Physics for Medicine and Biology (Sec. 1.1), Russ Hobbie and I discuss “Distances and Sizes.”
In biology and medicine, we study objects that span a wide range of sizes: from giant redwood trees to individual molecules. Therefore, we begin with a brief discussion of length scales.
At the end of this section, we conclude
To examine the relative sizes of objects in more detail, see Morrison et al. (1994) or Goodsell (2009).
I have talked about the book Powers of Ten by Morrison et al. previously in this blog. I have also mentioned David Goodsell’s book The Machinery of Life several times, but until today I have never devoted an entire blog entry to it.

In the 4th edition of IPMB, Russ and I cited the first edition of The Machinery of Life (1998), and that is the edition that sits on my bookshelf. When preparing the 5th edition, we updated our references, so we now cite the second edition of Goodsell's book (2009). Is there much difference between the two? Yes! Like when Dorothy left Kansas to enter Oz, the first edition is all black and white but the second edition is in glorious color. And what a difference color makes in a book that is first and foremost visual. The second edition of The Machinery of Life is stunningly beautiful. It is not just a colorized version of the first edition; it is a whole new book. Goodsell writes in the preface
I created the illustrations in this book to help bridge this gulf and allow us to see the molecular structure of cells, if not directly, then in an artistic rendition. I have included two types of illustrations with this goal in mind: watercolor paintings which magnify a small portion of a living cell by one million times, showing the arrangement of molecules inside, and computer-generated pictures, which show the atomic details of individual molecules. In this second edition of The Machinery of Life, these illustrations are presented in full color, and they incorporate many of the exciting scientific advances of the 15 years since the first edition.

As with the first edition, I have used several themes to tie the pictures together. One is that of scale. Most of us do not have a good concept of the relative sizes of water molecules, proteins, ribosomes, bacteria, and people. To assist with this understanding, I have drawn the illustrations at a few consistent magnifications. The views showing the interiors of living cells, as in the Frontispiece and scattered through the last half of the book, are all drawn at one million times magnification. Because of this consistent scale, you can flip between pages in these chapters and compare the sizes of DNA, lipid membranes, nuclear pores, and all of the other molecular machinery of living cells. The computer-generated figures of individual molecules are also drawn at a few consistent scales to allow easy comparison.

I have also drawn the illustrations using a consistent style, again to allow easy comparison. A space-filling representation that shows each atom as a sphere is used for all the illustrations of molecules. The shapes of the molecules in the cellular pictures are simplified versions of these space-filling pictures, capturing the overall form of the molecule without showing the location of every atom. The colors, of course, are completely arbitrary since most of these molecules are colorless. I have chosen them to highlight the functional features of the molecules and cellular environments.
I have often wondered how much molecular biology a biological or medical physicist needs to know. I suppose it depends on their research specialty, but in general I believe a physicist who has read and understood The Machinery of Life has most of what you need to begin working at the interface of physics and biology: An understanding of the relative scale of biological objects, an overview of the different types of biological molecules and their structures and functions, and a visual sense of how these molecules fit together to form a cell. To the physicist wanting an introduction to biology on the molecular scale, I recommend starting with The Machinery of Life. That’s why it was included in my ideal bookshelf.

Goodsell fans might enjoy visiting his website: http://mgl.scripps.edu/people/goodsell. There you can download a beautiful poster of different proteins, all drawn to scale. There are many other illustrations and publications. Enjoy!

Friday, July 3, 2015

Fermi Problems and the Annual Background Radiation Dose from Potassium-40

In the very first section of the 5th edition of Intermediate Physics for Medicine and Biology, Russ Hobbie and I emphasize the importance of being able to estimate.
One valuable skill in physics is the ability to make order of magnitude estimates, meaning to calculate something approximately right.
Our first four homework problems at the end of Chapter 1 ask the student to estimate. These exercises are examples of Fermi Problems, after physicist Enrico Fermi who was a master of the skill.

Let us try another of these problems, based on some of the concepts from Chapter 15 about the natural background radiation dose. To be specific, let’s estimate the annual background dose from the radioactive isotope potassium-40 inside our bodies.
Problem 4 ½ Estimate the annual background dose (in mSv/year) from potassium-40 in our bodies. Look up or guess any information you need for this calculation, and clearly explain any assumptions you make.
Begin by considering a single cell. Cells are about 10 microns in size, so their volume is about (10−5 m)3 = 10−15 m3 (the volume we use is not important; it will cancel out in the end). In nerves, the intracellular potassium ion concentration is about 100 mM, but this may overestimate the amount of potassium inside all types of cells. Moreover, the concentration of potassium ions in the extracellular space is much less that in the intracellular space. Let’s guess 50 mM for the average concentration of potassium in our body, meaning 50 millimoles/liter, or 50 moles/m3. If we multiply by Avogadro’s number (6 x 1023 molecules/mole), we get about 3 x 1025 molecules/m3. So, the number of potassium atoms per cell is 3 x 1010. This intermediate result is already interesting; there are over ten billion potassium ions in just one cell.

The 40K isotope is radioactive. Its abundance is about 0.01% (abundance data can be found in any table of the isotopes, or even by looking at wikipedia; I don’t know how you could guess that value from first principles). So, this means there are 3 x 106 40K atoms/cell (a little over a million). How rapidly do these decay? 40K has a half life of 1.25 x 109 years (again, see wikipedia), implying a decay rate of 0.693/1.25 x 109 = 5.5 x 10−10 decays per atom per year. Multiplying by the number of atoms/cell, we get 0.0017 decays per cell per year. This is another interesting result: an average cell has less than a one-percent chance of experiencing a 40K decay in a year. But we have a lot of cells (Russ and I estimate 2 x 1014 in IPMB), so your body suffers from about 3.4 x 1011 decays per year, or about ten thousand per second. (According to Wikipedia, this estimate is a factor of two too high, but we are not much worried about factors of two in such order-of-magnitude Fermi problems.)

How much energy does each decay deposit in our tissue? Beta decay accounts for 90% of all decays of 40K, and each decay releases an energy of about 1.3 MeV (decay energy data is a little harder to find, but appears in any good table of the isotopes; if you had merely guessed that 1 MeV is the order of magnitude of nuclear decay energies, you would not be too far off). Some of that energy goes to a neutrino, which leaves the body. Let’s assume that on average about 30% of the beta decay energy goes to the electron and that no electrons escape the body, so each decay deposits 0.4 MeV into the cell, or 6 x 10−14 joules. A gray (the unit of dose) is a joule per kilogram, so to calculate dose we need the mass of a cell, which to a first approximation is the product of the density of water (103 kg/m3) times the volume of the cell, or 10−12 kg (I told you the volume of the cell would cancel out). So, the dose is the number of decays per year (0.0017) times the energy per decay (6 x 10−14 J) divided by the mass (10−12 kg), or 0.0001 gray/year. Another unit of dose is the sievert, which accounts for biological damage in addition to energy deposition. A gray and a sievert are the same for electrons, so the annual background dose is 0.0001 Sv, or 0.1 mSv.

In Table 16.6 of IPMB, Russ and I estimate the annual background dose from all internal sources is about 0.3 mSv. Because 40K is not the only isotope in our body that is decaying (for example, carbon-14 is another), we seem to have gotten our order-of-magnitude estimate pretty close. One goal of Chapters 16 and 17 in IPMB is to refine such calculations. For medical purposes you need more accuracy; for a Fermi problem we did okay.